<%@ page import="zzc.javaWeb.javaWebHomew.dao.homeDaoimp" %><%--
  Created by IntelliJ IDEA.
  User: Zhangzaichen
  Date: 2021/6/23
  Time: 20:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <title>学生抢课管理系统</title>
    <style type="text/css">

        *{
            margin: 0;
            padding: 0;
            font-size: 1rem;
        }
        body{

            background-image: url("https://i.loli.net/2021/05/22/YDU8jLeolX2FyEn.jpg");
            background-repeat: repeat;
            background-position: right;
        }
        #container{
            padding: 10px;
            margin: 0 auto;
            width: 80%;
            height: 100%;
        }
        .top{
            background:black;
            color: white;
            padding: 10px;
            font-size: 1.25rem;
            font-weight: bold;
        }
        .nav{
            background:#6e6767;
            padding: 1.25rem;
        }
        .conter{
            padding: 20px 7%;
            background-color:#ffffff;
        }
        .conter_up{
            text-decoration: none;
            color: #9292ee;
            font-size: 1rem;
            font-weight: bold;
            letter-spacing: 0.2rem;
            padding-bottom: 20px;
        }
        .conter_middle table{
            border: 1px solid ;
            text-align: center;
            width: 100%;
            font-size: 1.5rem;
            letter-spacing: 0.1rem;
            border: 2px solid black;
        }
        .conter_middle td,th{
            border: 1px solid #6e6767;
            height: 45px;
        }
        .conter_middle a{
            text-decoration: none;
            font-weight: bold;
        }
        .conter_down{
            display: flex;
            justify-content: flex-end;
            padding: 20px;
        }
        .conter_down>*{
            margin-right: 8px;
        }
        .foot{

            padding: 20px;
            color: white;
            display: flex;
            justify-content: center;
        }
    </style>
</head>
<body>
<div id="container">
    <div class="top">
        欢迎进入学生抢课管理信息平台
    </div>
    <div class="nav">
        <a href="stuhome.jsp" style="color: black">返回</a>
    </div>
    <div class="conter">
        <div class="conter_up">
           抢课信息回馈
        </div>
        <%
            request.setCharacterEncoding("utf-8");
        String _id = request.getParameter("id");
        String _name=request.getParameter("name");
        int flag = 0;
        if (_id!=null) {
            int id = Integer.parseInt(_id);

            homeDaoimp homeDaoimp = new homeDaoimp();
            flag = homeDaoimp.updatexk(id);
            System.out.println("flag="+flag);
        }
            if (flag>0){
                // System.out.println("抢题余量可以执行");
                // System.out.println("抢题成功");

               %>
        <h3>请以结果集为准</h3>
        <a href="/Jer/Res?tihao=<%=_id%>&name=<%=_name%>">查看结果集</a>
        <%

            }
            else {
                // System.out.println("抢题失败");

        %>
        <h3>抢题失败！</h3>
        <%
            }
        %>





        <div class="conter_middle">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                <a href="javascript:history.back(-1)">立即返回</a>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

</body>
</html>
